# -*- coding: utf-8 -*-
from django.db import models
     
class Task(models.Model):

    STATUS_FREE = 0
    STATUS_BUSY = 1

    STATUSES = (
        (STATUS_FREE, "Свободна"),
        (STATUS_BUSY, "Выполняется")
    )

    name = models.CharField(max_length=64)
    command = models.CharField(max_length=512)
    status = models.IntegerField(choices=STATUSES, default=STATUS_FREE)


class Category(models.Model):

    title = models.CharField(max_length=128, blank=False)
    description = models.TextField(null=True, blank=True)


    meta_title = models.CharField(max_length=256, null=True, blank=True)
    meta_description = models.CharField(max_length=200, null=True, blank=True)
    meta_keywords = models.CharField(max_length=256, null=True, blank=True)

    url = models.CharField(max_length=128, blank=False)

    parent = models.ForeignKey('self', null=True, blank=True)

    def __unicode__(self):
        return self.title